package com.javagi;

import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author kuiwang
 * @Date 2020/5/18 18:07
 * @Version 1.0
 */
//@EnableApolloConfig //开启apollo配置中心
@SpringBootApplication
@RestController
//@EnableElasticsearchRepositories(basePackages = "com.javagi.reposiory")
public class AppTest {
    public static void main(String[] args) {
        SpringApplication.run(AppTest.class,args);
    }

    @Value("${spring.application.name}")
    private String name;

    @GetMapping("/getIndex")
    public String getIndex(){
        return "This is my first maven build ! " + name;
    }
}